<layout name='layout_page' />

<div class="row">
	<div class="col-lg-12">
		<div class="row">
			<div class="col-lg-12">
				<ol class="breadcrumb">
					<li><a href="<{:U('Index/index')}>">Home</a></li>
					<li>My mentees</li>
					<li class="active"><span>Request</span></li>
				</ol>
				<h1>Request</h1>
			</div>
		</div>


		<div class="row">
			<div class="col-lg-12">
				<div class="main-box clearfix">
					<header class="main-box-header clearfix">
						<div class="filter-block pull-left">
							<select class="form-control" name="status" id="status">
								<option <?php if($status==-1){echo 'selected';} ?> value="">select</option>
								<option <?php if($status==0){echo 'selected';} ?> value="0">untreated</option>
								<option <?php if($status==1){echo 'selected';} ?> value="1">passing</option>
								<option <?php if($status==2){echo 'selected';} ?> value="2">rejected</option>
							</select>		
						</div>
					</header>
					<div class="main-box-body clearfix">
						<div class="table-responsive clearfix">
							<table class="table user-list table-hover">
								<thead>
									<tr>
										<th>User</th>
										<th>Aubject</th>
										<th>Date</th>
										<th class="text-center"><span>Status</span></th>
										<th class="text-right">View</th>
									</tr>
								</thead>
								<tbody>
									<volist name="list" id="vo">
									<tr>
										<td>
										<img src="<{$vo.fromFace|getFace=###}>" class="listFace">
										<a href="<{:U('Apprentice/view',array('id'=>$vo['id']))}>" class="user-link"><{$vo.fromName}></a>
										</td>
										<td>Want to learn <strong><{$vo.trainItem}></strong></td>
										<td><{$vo.createTime|date="F,d,Y H:i:s",###}></td>										
										<td class="text-center">
										<switch name="vo.status">
										<case value="0"><span class="label label-danger">New</span></case>
										<case value="1"><span class="label label-success">Passing</span></case>
										<case value="2"><span class="label label-warning">Rejected</span></case>
										<default /><span class="label label-danger">New</span>
										</switch>										
										</td>
										<td class="text-right" style="width: 15%;"><a href="<{:U('Apprentice/view',array('id'=>$vo['id']))}>" class="table-link"> <span class="fa-stack"> <i class="fa fa-square fa-stack-2x"></i> <i class="fa fa-search-plus fa-stack-1x fa-inverse"></i> </span> </a></td>
									</tr>
									</volist>									
								</tbody>
							</table>
						</div>
					</div>
				</div>
			</div>
		</div>


		<div class="row">
			<div class="col-md-12">
				<div class="page">
					<nav>
	  					<ul class="pagination"><{$page}></ul>
	  				</nav>
	  			</div>
			</div>
		</div>

	
	</div>
</div>

<script type="text/javascript">
$(function(){
	$("#status").change(function(){
		var status=$(this).val();
		if(status==""){
			status=-1;
		}
		var url="/index.php?m=Mentors&c=Apprentice&a=index&status="+status;
		window.location.href=url;
	});
})
</script>